package PTA.javabianchengjichu2;

import java.sql.SQLSyntaxErrorException;
import java.util.Locale;
import java.util.Scanner;

public class ex11 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        // System.out.println(Integer.toString(n,16));
if(n>0&&n<15){
    System.out.println(Integer.toString(n,16).toUpperCase() );
}else{
    System.out.println("Invalid input");
}


    }
}
